<?php
include_once("../../../config.php");


$member=$_REQUEST['Authorization'];


//获取当前申请中的标签，不提供选择
$now_tag                = select_lines_all_items($table_prefix."member_group","","member_nid = '$member'","");
$now_tag_nid_list_array = transform_2darray_in_1darray_number_as_key($now_tag,"group_nid");


//获取所有标签
$_all=['nid'=>0,'name'=>"全部"];

$_group_tag_list=select_lines_all_items($table_prefix."group","nid desc","nid >1 and status = '正常' ","");


foreach ($_group_tag_list as $k=>$v)
{
    if(!in_array($v['nid'],$now_tag_nid_list_array))
    {
        $group_tag_list[] = $v;
    }
}


$group_tag_list=array_merge(array($_all),$group_tag_list);


$data          = $group_tag_list;



$arr['status'] = 200;
$arr['info']   = $data;
die(json_encode($arr));
?>